package com.selfdriving.bean;

import android.location.Location;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;

public class ScenicSpots extends Entity implements Parcelable
{
	private String img;
	private String address;
	private String name;
	private String phoneNum;
	private String price;
	private double distance;
	private Bundle mylocation;
	private Bundle scenicLocation;

	public ScenicSpots(String img, String address, String name,
			String phoneNum, String price, double distance, Bundle mylocation,
			Bundle scenicLocation)
	{
		super();
		this.img = img;
		this.address = address;
		this.name = name;
		this.phoneNum = phoneNum;
		this.price = price;
		this.distance = distance;
		this.mylocation = mylocation;
		this.scenicLocation = scenicLocation;
	}

	public String getPrice()
	{
		return price;
	}

	public void setPrice(String price)
	{
		this.price = price;
	}

	public String getImg()
	{
		return img;
	}

	public void setImg(String img)
	{
		this.img = img;
	}

	public Bundle getMylocation()
	{
		return mylocation;
	}

	public void setMylocation(Bundle mylocation)
	{
		this.mylocation = mylocation;
	}

	public Bundle getScenicLocation()
	{
		return scenicLocation;
	}

	public void setScenicLocation(Bundle scenicLocation)
	{
		this.scenicLocation = scenicLocation;
	}

	public String getAddress()
	{
		return address;
	}

	public void setAddress(String address)
	{
		this.address = address;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getPhoneNum()
	{
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum)
	{
		this.phoneNum = phoneNum;
	}

	@Override
	public int describeContents()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public double getDistance()
	{
		return distance;
	}

	public void setDistance(double distance)
	{
		this.distance = distance;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags)
	{
		// TODO Auto-generated method stub
		dest.writeString(img);
		dest.writeString(this.address);
		dest.writeString(this.name);
		dest.writeString(this.phoneNum);
		dest.writeDouble(this.distance);
		dest.writeBundle(this.mylocation);
		dest.writeBundle(this.scenicLocation);
	}

	public static final Parcelable.Creator<ScenicSpots> CREATOR = new Parcelable.Creator<ScenicSpots>()
	{

		@Override
		public ScenicSpots createFromParcel(Parcel source)
		{
			return new ScenicSpots(source);
		}

		@Override
		public ScenicSpots[] newArray(int size)
		{
			return new ScenicSpots[size];
		}
	};

	public ScenicSpots(Parcel dest)
	{
		this.address = dest.readString();
		this.name = dest.readString();
		this.phoneNum = dest.readString();
		this.distance = dest.readDouble();
		this.mylocation = dest.readBundle(Location.class.getClassLoader());
		this.scenicLocation = dest.readBundle(Location.class.getClassLoader());
	}
}
